//
//  UIImage+ZLIMCustom.m
//  ZLYoYoIM_Example
//
//  Created by 赵磊 on 2021/1/18.
//  Copyright © 2021 itzhaolei. All rights reserved.
//

#import "UIImage+ZLIMCustom.h"

@interface ZLIMCustomImageModel : NSObject

@end

@implementation ZLIMCustomImageModel

@end

@interface ZLIMCustomImage : UIImage

@end

@implementation ZLIMCustomImage

@end

@implementation UIImage (ZLIMCustom)

///加载图片
+ (UIImage *)imageNamedInIM:(NSString *)imageName {
    NSBundle *bundle = [NSBundle bundleForClass:[ZLIMCustomImageModel class]];
    NSURL *url = [bundle URLForResource:@"ZLYoYoIM" withExtension:@"bundle"];
    NSBundle *resourceBundle = [NSBundle bundleWithURL:url];
    UIImage *image = [ZLIMCustomImage imageNamed:imageName inBundle:resourceBundle compatibleWithTraitCollection:nil];
    if (!image) {
        image = [ZLIMCustomImage imageNamed:imageName];
    }
    return image;
}

@end
